import {
	request,upload
} from '@/service/request.js'
/**
 * @param {Object} data查询全部商品类别信息接口
 */
export function userUpload(data) {
	return upload(`/jshopmobile/user/upload`, data)
}
/**
 * @param {Object} data查询全部商品类别信息接口
 */
export function getCategoryList(data) {
	return request('GET', `/jshopmobile/category/list`, data)
}
/**
 * @param {Object} data查询全部商品类别信息接口
 */
export function getTopicList(data) {
	return request('GET', `/jshopmobile/topic/list`, data)
}
/**
 * @param {Object} data根据id查询专题信息接口
 */
export function getTopic(data) {
	return request('GET', `/jshopmobile/topic/`+data)
}
/**
 * @param {Object} data查询新品信息接口
 */
export function getGoodsSearchNew(data) {
	return request('GET', `/jshopmobile/goods/searchNew`, data)
}
/**
 * @param {Object} data查询新品信息接口
 */
export function getGoodsSearchHot(data) {
	return request('GET', `/jshopmobile/goods/searchHot`, data)
}
/**
 * @param {Object} data根据名称模糊查询商品信息接口
 */
export function getGoodsSearch(data) {
	return request('GET', `/jshopmobile/goods/search`, data)
}
/**
 * @param {Object} data根据名称模糊查询商品信息接口
 */
export function getGoods(data) {
	return request('GET', `/jshopmobile/goods/`+data)
}
/**
 * @param {Object} data添加购物车接口
 */
export function userCartAdd(data) {
	return request('GET', `/jshopmobile/user/cart/add`,data)
}
/**
 * @param {Object} data查询某用户购物车商品数量信息接口
 */
export function userCartCount(data) {
	return request('GET', `/jshopmobile/user/cart/count`,data)
}
/**
 * @param {Object} data根据类别查询商品信息接口
 */
export function goodsQueryGoods(data) {
	return request('GET', `/jshopmobile/goods/queryGoods`,data)
}
/**
 * @param {Object} data判断用户是否收藏某商品接口
 */
export function userIfLike(data) {
	return request('GET', `/jshopmobile/user/favorite/ifLike`,data)
}
/**
 * @param {Object} data收藏商品接口
 */
export function userAdd(data) {
	return request('GET', `/jshopmobile/user/favorite/add`,data)
}
/**
 * @param {Object} data收藏商品接口
 */
export function userDislike(data) {
	return request('GET', `/jshopmobile/user/favorite/dislike`,data)
}
/**
 * @param {Object} data查询某用户购物车信息
 */
export function cartQueryByUser(data) {
	return request('POST', `/jshopmobile/user/cart/queryByUser`,data)
}
/**
 * @param {Object} data修改购物车信息接口
 */
export function cartUpdate(data) {
	return request('POST', `/jshopmobile/user/cart/update`,data)
}
/**
 * @param {Object} data删除购物车信息接口
 */
export function cartDelete(data) {
	return request('POST', `/jshopmobile/user/cart/delete`,data)
}
/**
 * @param {Object} data获取某用户所有收藏商品信息接口
 */
export function favoriteList(data) {
	return request('POST', `/jshopmobile/user/favorite/list`,data)
}
/**
 * @param {Object} data获取某用户所有收藏商品信息接口
 */
export function favoriteDislikeBatch(data) {
	return request('POST', `/jshopmobile/user/favorite/dislikeBatch`,data)
}
/**
 * @param {Object} data获取商城积分兑换规则接口
 */
export function getScoreRule(data) {
	return request('GET', `/jshopmobile/pay/getScoreRule`,data)
}
/**
 * @param {Object} data提交订单接口
 */
export function orderSave(data) {
	return request('POST', `/jshopmobile/user/order/save`,data)
}
/**
 * @param {Object} data保存地址信息接口
 */
export function addressSave(data) {
	return request('POST', `/jshopmobile/user/address/save`,data)
}
/**
 * @param {Object} data保存地址信息接口
 */
export function addressDelete(data) {
	return request('POST', `/jshopmobile/user/address/delete`,data)
}
/**
 * @param {Object} data查询某地址详细信息接口
 */
export function addressAddress(data) {
	return request('POST', `/jshopmobile/user/address/address`,data)
}
/**
 * @param {Object} data查询用户全部地址信息接口
 */
export function addressQueryByUser(data) {
	return request('POST', `/jshopmobile/user/address/queryByUser`,data)
}
/**
 * @param {Object} data开始支付接口
 */
export function startPay(data) {
	return request('POST', `/jshopmobile/user/order/startPay`,data)
}
/**
 * @param {Object} data申请退款接口
 */
export function refund(data) {
	return request('POST', `/jshopmobile/user/order/refund`,data)
}
/**
 * @param {Object} data支付成功接口
 */
export function paySuccess(data) {
	return request('POST', `/jshopmobile/user/order/paySuccess`,data)
}
/**
 * @param {Object} data修改用户信息接口
 */
export function userUpdate(data) {
	return request('POST', `/jshopmobile/user/update`,data)
}
/**
 * @param {Object} data重置密码验证码发送接口
 */
export function sendForgetSms(data) {
	return request('POST', `/jshopmobile/user/sendForgetSms`,data)
}
/**
 * @param {Object} data修改注册手机号验证码发送接口
 */
export function sendMobileSms(data) {
	return request('POST', `/jshopmobile/user/sendMobileSms`,data)
}
/**
 * @param {Object} data查询某用户订单信息接口
 */
export function getOrders(data) {
	return request('POST', `/jshopmobile/user/order/getOrders`,data)
}
/**
 * @param {Object} data取消订单接口
 */
export function orderCancel(data) {
	return request('POST', `/jshopmobile/user/order/cancel`,data)
}
/**
 * @param {Object} data提醒收货接口
 */
export function orderNotify(data) {
	return request('POST', `/jshopmobile/user/order/notify`,data)
}
/**
 * @param {Object} data确认收货接口
 */
export function orderConfirm(data) {
	return request('POST', `/jshopmobile/user/order/confirm`,data)
}
/**
 * @param {Object} data确认收货接口
 */
export function orderGetOrders(data) {
	return request('GET', `/jshopmobile/user/order/${data.orderSn}`,data)
}
